import type { AppRouteModule } from '@/router/types';

import { LAYOUT } from '@/router/constant';
import { t } from '@/hooks/web/useI18n';

const systemRoute: AppRouteModule = {
  path: '/system',
  name: 'system',
  component: LAYOUT,
  redirect: '/system/department',
  meta: {
    orderNo: 90006,
    roles: ['/system'],
    hideChildrenInMenu: false,
    icon: 'icon-park-outline:system',
    title: t('routes.system.system'),
  },
  children: [
    {
      path: 'department',
      name: 'Department',
      component: () => import('@/views/system/department/index.vue'),
      meta: {
        hideMenu: false,
        roles: ['/system/department'],
        title: t('routes.system.department'),
      },
    },
    {
      path: 'permission',
      name: 'Permission',
      component: () => import('@/views/system/permission/index.vue'),
      meta: {
        hideMenu: false,
        roles: ['/system/permission'],
        title: t('routes.system.permission'),
      },
    },
    {
      path: 'position',
      name: 'Position',
      component: () => import('@/views/system/position/index.vue'),
      meta: {
        hideMenu: false,
        roles: ['/system/position'],
        title: t('routes.system.position'),
      },
    },
    {
      path: 'staff',
      name: 'Staff',
      component: () => import('@/views/system/staff/index.vue'),
      meta: {
        hideMenu: false,
        roles: ['/system/staff'],
        title: t('routes.system.staff'),
      },
    },
    {
      path: 'homeConfig',
      name: 'HomeConfig',
      component: () => import('@/views/system/homeConfig/index.vue'),
      meta: {
        roles: ['/system/homeConfig'],
        title: t('routes.system.homeConfig'),
      },
    },
    {
      path: 'bizConfig',
      name: 'BizConfig',
      component: () => import('@/views/system/bizConfig/index.vue'),
      meta: {
        hideMenu: false,
        roles: ['/system/bizConfig'],
        title: t('routes.system.bizConfig'),
      },
    },
    {
      path: 'recharge',
      name: 'Recharge',
      component: () => import('@/views/system/recharge/index.vue'),
      meta: {
        hideMenu: false,
        roles: ['/system/recharge'],
        title: t('routes.system.recharge'),
      },
    },
  ],
};

export default systemRoute;
